#if !defined(__PRAY_CORE_PRAYSETTING_H)
#define __PRAY_CORE_PRAYSETTING_H

#define SETTING_IMG_ROSARY1_BIG						@"setting_rosary1big.png"
#define SETTING_IMG_ROSARY1_ON						@"setting_rosary1on.png"
#define SETTING_IMG_ROSARY1_OFF						@"setting_rosary1off.png"
#define SETTING_IMG_ROSARY2_BIG						@"setting_rosary2big.png"
#define SETTING_IMG_ROSARY2_ON						@"setting_rosary2on.png"
#define SETTING_IMG_ROSARY2_OFF						@"setting_rosary2off.png"
#define SETTING_IMG_ROSARY3_BIG						@"setting_rosary3big.png"
#define SETTING_IMG_ROSARY3_ON						@"setting_rosary3on.png"
#define SETTING_IMG_ROSARY3_OFF						@"setting_rosary3off.png"

#define SETTING_ROWHEIGHT							45

#define SETTING_SWITCH_LEFT							190

@class PraySettingViewController;
@class PraySettingData;

@protocol SelectRosaryViewControllerDelegate

@optional

- (void)onRosarySelected:(NSInteger)rosaryNum;

@end

@protocol SelectLanguageViewControllerDelegate

@optional

- (void)onLanguageSelected:(NSString*)language;

@end

@protocol PraySettingViewControllerDelegate

@optional

- (void)onSettingChanged:(PraySettingData*)setting;

@end

@interface PraySettingData : NSObject <NSCoding> {
    NSInteger 							_rosaryNum;
	BOOL								_isLeftHanded;
	BOOL								_enableLightMystery;
	NSInteger							_curDay;
	NSDate*								_startDate;
	NSDate*								_endDate;
	NSString*							_language;
	BOOL								_canVibrate;
	BOOL								_biggerFont;
}

@property (nonatomic, assign) NSInteger rosaryNum;
@property (nonatomic, assign) BOOL		isLeftHanded;
@property (nonatomic, assign) BOOL		enableLightMystery;
@property (nonatomic, assign) NSInteger curDay;
@property (nonatomic, retain) NSDate*	startDate;
@property (nonatomic, retain) NSDate*	endDate;
@property (nonatomic, retain) NSString*	language;
@property (nonatomic, assign) BOOL		canVibrate;
@property (nonatomic, assign) BOOL		biggerFont;

+ (PraySettingData*)getSettingDataFromDefaultPath;
+ (void)saveSettingDataToDefaultPath:(PraySettingData*)data;

@end

@interface PraySettingNavigationController : BaseNavigationViewController <UINavigationControllerDelegate>
{
	PraySettingViewController*			_praySettingViewController;
}

@end

@interface PraySettingViewController : BaseTableViewController <SelectRosaryViewControllerDelegate, SelectLanguageViewControllerDelegate, UITableViewDelegate> {
	UIView*									_backgroundView;
	
	id<PraySettingViewControllerDelegate>	_delegate;
	
	PraySettingData*						_settingData;
	UISwitch*								_switchBiggerFont;
	UISwitch*								_switchLeftHand;
	UISwitch*								_switchLightMystery;
	UISwitch*								_switchVibrate;
}

@property (nonatomic, assign) id<PraySettingViewControllerDelegate>	delegate;

@end

@interface SelectRosaryViewController : BaseViewController 
{
	id<SelectRosaryViewControllerDelegate>	_delegate;
	NSInteger								_selectedRosaryNum;
	
	UIImageView*							_bigRosaryView;
	UITextView*								_rosaryName;
	UITextView*								_rosaryDescription;
	
	ImageButton*							_rosary1;
	ImageButton*							_rosary2;
	ImageButton*							_rosary3;
}

@property (nonatomic, assign) id<SelectRosaryViewControllerDelegate>	delegate;

- (id)initWithRootViewController:(PrayViewController *)rootViewController rosary:(NSInteger)rosaryNum;

@end

@interface SelectLanguageViewController : BaseTableViewController <UITableViewDelegate>
{
	UIView*										_backgroundView;
	
	id<SelectLanguageViewControllerDelegate>	_delegate;
	NSString*									_selectedLanguage;
	NSInteger									_selectedCell;
	
	NSArray*									_languageList;
	UILabel*									_languageLabel;
}

@property (nonatomic, assign) id<SelectLanguageViewControllerDelegate>	delegate;

- (id)initWithRootViewController:(PrayViewController *)rootViewController language:(NSString*)language;

@end


#endif // !__PRAY_CORE_PRAYSETTING_H